﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Arcana.Contract.Tests.Argument.Has
{
    [TestClass]
    public class AllAttributeTest
    {
        [Arcana.Contract.Argument.Has.All("param", new object[] { 1, 2, 3})]
        public static void Target_1(IList<int> param)
        {
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        [ExpectedException(typeof(ArgumentException))]
        public void ShouldThrowException_1()
        {
            Target_1(new int[] { 3, 1, 5, 6, 7 }.ToList());
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass()
        {
            Target_1(new int[] { 4, 5, 7, 3, 3, 0, -1, 1, 4, 4, 4, 2 }.ToList());
        }
    }
}
